package com.gegao.cashsys._01_simple_factory.cash;

/**
 * Created by zhangzhanzhong on 2015/12/25.
 */
public class CashFactory {
    public static CashSuper createCashAccept(String type) {
        CashSuper cashSuper = null;
        switch (type) {
            case "nomal":
                cashSuper = new CashNomal();
                break;
            case "rebase":
                cashSuper = new CashRebase(0.8d);
                break;
            case "return":
                cashSuper = new CashReturn(300d, 100d);
                break;
        }
        return cashSuper;
    }
}
